﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

// 进攻行内的数据
public class AttackLine
{
    public int RowIndex;
    public Vector3 StartPoint;
    // 该行当前僵尸
    public List<ZombieInScene> AllZombie = new List<ZombieInScene>();

    // 所有的格子
    private List<Grid> _allGrids;

    // 是否有僵尸
    public bool HasZombie { get { return AllZombie.Count > 0; } }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="allGrids">当前进攻线包含的所有格子</param>
    public void Init(List<Grid> allGrids)
    {
        _allGrids = allGrids;
        foreach (var grid in _allGrids)
        {
            grid.SetAttackLine(this);
        }
    }
}
